function onPropertyChangeFcn(obj,model, event)

% This file is part of CISNE.
%
%     CISNE is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     any later version.
%
%     CISNE is distributed in the hope that it will be useful,
%     but WITHOUT ANY WARRANTY; without even the implied warranty of
%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%     GNU General Public License for more details.
%
%     You should have received a copy of the GNU General Public License
%     along with CISNE.  If not, see <http://www.gnu.org/licenses/>.

% Copyright 2011. Jose Maria Garcia-Valdecasas Bernal

%update only vector properties (those which have children and can't be
%edited themselves).

propName=char(event.getPropertyName);

switch propName
    
    case {'Spt sector.Min dir', 'Spt sector.Max dir'}
      minDir = model.getProperty('Spt sector.Min dir').getValue;
      maxDir = model.getProperty('Spt sector.Max dir').getValue;
      parentProp = model.getProperty(propName).getParent;
      parentProp.setValue(sprintf('min: %dº ; max: %dº',minDir,maxDir));
end


model.refresh();